<!-- 添加、编辑党组织 -->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>政府人员添加页面</title>
  <link rel="stylesheet" href="../../yl/index.css" />
  <!-- 布局样式 -->
  <link rel="stylesheet" href="../../yl/style.css" />
  <link rel="stylesheet" href="../../yl/mobile.css" />
  <link rel="stylesheet" href="../../yl/easyui.css" />
  <link rel="stylesheet" href="../../yl/icon.css" />
</head>

<body>
  <div class="easyui-navpanel" id="app" v-cloak>
    <header>
      <div class="m-toolbar">
        <div class="m-title">{{action=='Add'?'添加政府人员信息':action=='Modify'?'修改政府人员信息':''}}</div>
      </div>
    </header>
    <div class="easyui-navpanel panel-body panel-body-nobottom panel-body-noborder" style="height: 3000px"
      id="MainTable" ref="MainTable"
      :data-options="JSON.stringify({ 'TableName': 'government_member_information', 'form': 'dataForm','primary_key': 'Government_Member_SerialNumber' })">
      <div class="yl-main">
        <div class="table_titel">
          <div class="titel">政府人员信息</div>
        </div>
        <el-form :model="dataForm" ref="formRef" :inline-message="true" >
          <el-descriptions :column="1" size="large" border>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">政府人员头像</div>
              </template>
              <el-form-item>
                <yl-upload v-model="dataForm.Picture_URL"></yl-upload>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">加入日期</div>
              </template>
              <el-form-item prop="Joining_Date"  :rules="[{ required: true, message: '请选择加入日期', trigger: 'change' }]">
                <el-date-picker v-model="dataForm.Joining_Date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
                  class="borderless-input" type="date" placeholder="请选择加入日期" size="large" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">所属政府</div>
              </template>
              <el-form-item prop="Government_Agencies_SerialNumber" :rules="[{ required: true, message: '请选择所属政府', trigger: 'change' }]">
                <yl-cascader v-model="dataForm.Government_Agencies_SerialNumber" filterable
                  :props="{value:'Government_Agencies_SerialNumber',label:'Agensies_Name',children:'children',checkStrictly: true}"
                  placeholder="请选择所属政府" :options="Manager" style="width: 100%"></yl-cascader>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">政府人员身份证</div>
              </template>
              <el-form-item prop="ID_Card_Number"  :rules="[{ required: true, message: '请输入政府人员身份证', trigger: 'blur' }]">
                <el-input @change="shibie" v-model="dataForm.ID_Card_Number" class="borderless-input"
                  placeholder="请输入政府人员身份证" />
              </el-form-item>
            </el-descriptions-item>
          </el-descriptions>
        </el-form>
        <el-form :model="dataForm1" ref="formRef1" :inline-message="true" >
          <el-descriptions :column="1" size="large" border>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">政府人员姓名</div>
              </template>
              <el-form-item prop="Personal_Name" :rules="[{ required: true, message: '请输入政府人员姓名', trigger: 'blur' }]">
                <el-input :disabled="!is" v-model="dataForm1.Personal_Name" class="borderless-input" placeholder="请输入政府人员姓名" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">性别</div>
              </template>
              <el-form-item prop="Gender" :rules="[{ required: true, message: '请选择性别', trigger: 'change' }]">
                <el-select :disabled="!is" v-model="dataForm1.Gender" placeholder="请选择性别" size="large">
                  <el-option v-for="item in ['男','女']" :key="item" :label="item" :value="item" />
                </el-select>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">出生日期</div>
              </template>
              <el-date-picker :disabled="!is" v-model="dataForm1.Birthday" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
                class="borderless-input" type="date" placeholder="请选择出生日期" size="large" />
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">户籍地省/市/区</div>
              </template>
              <el-form-item prop="RR_County_Nubmer" :rules="[{ required: true, message: '请选择户籍地省/市/区', trigger: 'change' }]">
                <el-cascader :disabled="!is" @change="changeCity" v-model="cityValue" filterable class="borderless-input"
                :props="{value:'value',label:'label',children:'children'}" placeholder="请选择省市区" :options="city"
                style="width: 100%"></el-cascader>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">户籍地乡镇/村庄</div>
              </template>
              <el-form-item prop="RR_Village_Number" :rules="[{ required: true, message: '请选择户籍地乡镇/村庄', trigger: 'change' }]">
                <el-cascader :disabled="city1.length == 0 || !is" @change="changeCity1" class="borderless-input"
                v-model="cityValue1" filterable :props="{value:'ProvinceNumber',label:'Province',children:'children'}"
                placeholder="请选择乡镇/村庄" :options="city1" style="width: 100%"></el-cascader>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">家庭地址</div>
              </template>
              <el-form-item prop="Home_Address" :rules="[{ required: true, message: '请输入家庭地址', trigger: 'blur' }]">
                <el-input :disabled="!is" v-model="dataForm1.Home_Address" class="borderless-input" placeholder="请输入家庭地址" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">民族</div>
              </template>
              <el-form-item prop="Nation" :rules="[{ required: true, message: '请选择民族/村庄', trigger: 'change' }]">
                <el-select :disabled="!is" v-model="dataForm1.Nation" placeholder="请选择民族" size="large">
                  <el-option v-for="item in Nation" :key="item.id" :label="item.name" :value="item.name" />
                </el-select>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">联系电话</div>
              </template>
              <el-form-item prop="Contact_Phone" :rules="[{ required: true, validator:PH_Validity, trigger: 'blur' }]">
                <el-input :disabled="!is" v-model="dataForm1.Contact_Phone" class="borderless-input" placeholder="请输入联系电话" />
              </el-form-item>
            </el-descriptions-item>
          </el-descriptions>
        </el-form>
      </div>
    </div>
    <footer class="botton-ann">
      <el-button @click="goBack">返回</el-button>
      <el-button type="primary" plain @click="handleSubmit" :loading="loading">提交</el-button>
    </footer>
  </div>
</body>
<script src="../../utils/utils.js"></script>
<script src="../../config/config.js"></script>
<script src="../../utils/compressor.js"></script>
<script src="../../utils/ID_Validity.js"></script>
<script src="../../utils/mixins.js"></script>
<script src="../../yl/vue.js"></script>
<script src="../../yl/index.js"></script>
<script src="../../yl/zh-cn.mjs"></script>
<script src="../../yl/index.iife.min.js"></script>
<script src="../../yl/jquery.min.js"></script>
<script src="../../utils/jquery.cookie.js"></script>
<script src="../../yl/jquery.easyui.min.js"></script>
<script src="../../yl/jquery.easyui.mobile.js"></script>
<script src="../../yl/moment.min.js"></script>
<script src="../../api/request.js"></script>
<script src="./js/add.js"></script>

</html>